<?php Yii::app()->clientScript->registerScript('emoticons',"
	jQuery('#emoticons a').click(function() {
		var emoticon = $(this).attr('data-emoticon');
		jQuery.markItUp({
			replaceWith: emoticon
		});
		return false;
	});
"); ?>

<fieldset>

	<?php if (isset($legend)): ?>
		<legend><?php echo $legend; ?></legend>
	<?php endif; ?>

<?php $form=$this->beginWidget('BootstrapActiveForm', array(
	'id'=>'comment-form',
	'action'=>$action,
	'enableAjaxValidation'=>true,
)); ?>

	<?php echo $form->hiddenField($model,'entryId',array('value'=>$entry->id)); ?>

	<?php echo $form->textFieldBlock($model,'alias',array('size'=>60,'maxlength'=>255)); ?>

	<?php echo $this->renderPartial('/comment/_formBody',array('model'=>$model,'form'=>$form)); ?>

	<div class="actions">
		<?php echo CHtml::submitButton(Yii::t('frontend','SUBMIT'),array('class'=>'btn primary')); ?>
		<?php if (isset($displayResetButton) && $displayResetButton): ?>
			<?php echo CHtml::resetButton(Yii::t('frontend','RESET'),array('class'=>'btn','confirm'=>Yii::t('frontend','Are you sure you want to reset this form?'))); ?>
		<?php endif; ?>
		<?php if (isset($displayCancelButton) && $displayCancelButton): ?>
			<?php echo CHtml::link(Yii::t('frontend','CANCEL'),array('entry/view','id'=>$model->entryId,'#'=>'comment-'.$model->id),array('class'=>'btn')); ?>
		<?php endif ;?>
	</div>

<?php $this->endWidget(); ?>

</fieldset>